package org.example.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 客户管理表
 * @TableName customer
 */
@TableName(value ="customer")
@Data
public class Customer implements Serializable {
    /**
     * 客户编号
     */
    @TableId(type = IdType.AUTO)
    private Integer customerId;

    /**
     * 客户编码
     */
    private String customerCode;

    /**
     * 客户名称
     */
    private String customerName;

    /**
     * 客户简称
     */
    private String customerAbbreviation;

    /**
     * 客户类型
     */
    private String customerType;

    /**
     * 客户电话
     */
    private String customerPhone;

    /**
     * 状态
     */
    private String status;

    /**
     * 客户英文名
     */
    private String customerEnglishName;

    /**
     * 客户简介
     */
    private String customerArofile;

    /**
     * 客户地址
     */
    private String customerAddress;

    /**
     * 客户官方地址
     */
    private String officialAddress;

    /**
     * 邮箱地址
     */
    private String emailAddress;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getCustomerCode() == null ? other.getCustomerCode() == null : this.getCustomerCode().equals(other.getCustomerCode()))
            && (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
            && (this.getCustomerAbbreviation() == null ? other.getCustomerAbbreviation() == null : this.getCustomerAbbreviation().equals(other.getCustomerAbbreviation()))
            && (this.getCustomerType() == null ? other.getCustomerType() == null : this.getCustomerType().equals(other.getCustomerType()))
            && (this.getCustomerPhone() == null ? other.getCustomerPhone() == null : this.getCustomerPhone().equals(other.getCustomerPhone()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCustomerEnglishName() == null ? other.getCustomerEnglishName() == null : this.getCustomerEnglishName().equals(other.getCustomerEnglishName()))
            && (this.getCustomerArofile() == null ? other.getCustomerArofile() == null : this.getCustomerArofile().equals(other.getCustomerArofile()))
            && (this.getCustomerAddress() == null ? other.getCustomerAddress() == null : this.getCustomerAddress().equals(other.getCustomerAddress()))
            && (this.getOfficialAddress() == null ? other.getOfficialAddress() == null : this.getOfficialAddress().equals(other.getOfficialAddress()))
            && (this.getEmailAddress() == null ? other.getEmailAddress() == null : this.getEmailAddress().equals(other.getEmailAddress()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getCustomerCode() == null) ? 0 : getCustomerCode().hashCode());
        result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
        result = prime * result + ((getCustomerAbbreviation() == null) ? 0 : getCustomerAbbreviation().hashCode());
        result = prime * result + ((getCustomerType() == null) ? 0 : getCustomerType().hashCode());
        result = prime * result + ((getCustomerPhone() == null) ? 0 : getCustomerPhone().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCustomerEnglishName() == null) ? 0 : getCustomerEnglishName().hashCode());
        result = prime * result + ((getCustomerArofile() == null) ? 0 : getCustomerArofile().hashCode());
        result = prime * result + ((getCustomerAddress() == null) ? 0 : getCustomerAddress().hashCode());
        result = prime * result + ((getOfficialAddress() == null) ? 0 : getOfficialAddress().hashCode());
        result = prime * result + ((getEmailAddress() == null) ? 0 : getEmailAddress().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", customerId=").append(customerId);
        sb.append(", customerCode=").append(customerCode);
        sb.append(", customerName=").append(customerName);
        sb.append(", customerAbbreviation=").append(customerAbbreviation);
        sb.append(", customerType=").append(customerType);
        sb.append(", customerPhone=").append(customerPhone);
        sb.append(", status=").append(status);
        sb.append(", customerEnglishName=").append(customerEnglishName);
        sb.append(", customerArofile=").append(customerArofile);
        sb.append(", customerAddress=").append(customerAddress);
        sb.append(", officialAddress=").append(officialAddress);
        sb.append(", emailAddress=").append(emailAddress);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}